<template>
  <div>
    <a-card title="项目信息" :bordered="true">
      <div class="table-page-search-wrapper">
        <a-form layout="inline" @keyup.enter.native="searchQuery">
          <a-row :gutter="24">
            <a-col :md="6" :sm="8">
              <a-form-item label="项目名称" :labelCol="{ span: 5 }" :wrapperCol="{ span: 18, offset: 1 }">
                <a-input placeholder="请输入项目名称查询"></a-input>
              </a-form-item>
            </a-col>
            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
              <a-col :md="6" :sm="24">
                <a-button type="primary" @click="searchQuery">查询</a-button>
              </a-col>
            </span>
          </a-row>
        </a-form>
      </div>
      <div>
        <a-table
          ref="table"
          size="small"
          :scroll="{ x: true }"
          bordered
          rowKey="id"
          :columns="columns"
          :dataSource="dataSource"
          :pagination="ipagination"
          :loading="loading"
          class="j-table-force-nowrap"
          @change="handleTableChange"
        >
          <a slot="projectName" @click="toDetailPage(record)" slot-scope="text, record">{{ text }}</a>
        </a-table>
      </div>
    </a-card>
  </div>
</template>

<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'

export default {
  name: 'FinanBiddingprojectInfoList',
  mixins: [JeecgListMixin, mixinDevice],
  data() {
    return {
      description: '招标项目信息管理页面',
      selectBankOk: false,
      ipagination1: {
        total: 0,
      },
      columns: [
        {
          title: '项目名称',
          align: 'center',
          dataIndex: 'projectName',
          key: 'projectName',
          slots: { title: 'projectName' },
          scopedSlots: { customRender: 'projectName' },
        },
        {
          title: '项目类型（1材料设备）',
          align: 'center',
          dataIndex: 'projectType',
        },
        {
          title: '招标项目编号',
          align: 'center',
          dataIndex: 'tenderProjectCode',
        },
        {
          title: '招标项目名称',
          align: 'center',
          dataIndex: 'tenderProjectName',
        },
        {
          title: '是否扶贫项目（1是0否）',
          align: 'center',
          dataIndex: 'povertyReliefProject',
        },
        {
          title: '公共资源交易类型',
          align: 'center',
          dataIndex: 'publicResourceType',
        },
        {
          title: '工程专业类型',
          align: 'center',
          dataIndex: 'engineeringMajorType',
        },
        {
          title: '入场登记部门',
          align: 'center',
          dataIndex: 'admissionDepartment',
        },
        {
          title: '项目行政主管地区',
          align: 'center',
          dataIndex: 'projectAdministrationArea',
        },
        {
          title: '行业主管部门',
          align: 'center',
          dataIndex: 'industryAuthorities',
        },
        {
          title: '行管部门审批备案编号',
          align: 'center',
          dataIndex: 'managementDeptno',
        },
        {
          title: '招标方式',
          align: 'center',
          dataIndex: 'biddingMethod',
        },
        {
          title: '资审方式',
          align: 'center',
          dataIndex: 'prequalificationMethod',
        },
        {
          title: '递交投标文件方式',
          align: 'center',
          dataIndex: 'tenderDocumentsMethod',
        },
        {
          title: '招标组织形式',
          align: 'center',
          dataIndex: 'tenderOrganizeForm',
        },
        {
          title: '主体建设单位',
          align: 'center',
          dataIndex: 'mainConstructionUnit',
        },
        {
          title: '组织机构代码/统一社会信用代码',
          align: 'center',
          dataIndex: 'organNo',
        },
        {
          title: '单位负责人',
          align: 'center',
          dataIndex: 'unitResponsiblePerson',
        },
        {
          title: '办公电话',
          align: 'center',
          dataIndex: 'phone',
        },
        {
          title: '移动电话',
          align: 'center',
          dataIndex: 'mobile',
        },
        {
          title: '招标代理机构名称',
          align: 'center',
          dataIndex: 'tenderAgencyName',
        },
        {
          title: '招标代理组织机构代码/统一社会信用代码',
          align: 'center',
          dataIndex: 'tenderAgencyCode',
        },
        {
          title: '招标负责人',
          align: 'center',
          dataIndex: 'tendererName',
        },
        {
          title: '招标负责人办公电话',
          align: 'center',
          dataIndex: 'tendererPhone',
        },
        {
          title: '移动电话',
          align: 'center',
          dataIndex: 'tendererMobile',
        },
        {
          title: '项目来源',
          align: 'center',
          dataIndex: 'projectSource',
        },
        {
          title: '入库时间（时间戳）',
          align: 'center',
          dataIndex: 'version',
        },
        {
          title: '交易平台编号',
          align: 'center',
          dataIndex: 'jyptBh',
        },
        {
          title: '行政区划代码',
          align: 'center',
          dataIndex: 'areaCode',
        },
      ],
      url: {
        list: '/finanBiddingprojectInfo/list',
      },
      dictOptions: {},
      superFieldList: [],
    }
  },
  created() {
    this.getSuperFieldList()
  },
  computed: {
    importExcelUrl: function () {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
    },
  },
  methods: {
    toDetailPage(record) {
      this.$router.push({
        path: '/finan/FinanProjectInfoDetail',
        query: {
          id: record.guid,
        },
      })
    },
    initDictConfig() {},
    getSuperFieldList() {
      let fieldList = []
      fieldList.push({ type: 'string', value: 'guid', text: '主键' })
      fieldList.push({ type: 'string', value: 'projectName', text: '项目名称' })
      fieldList.push({ type: 'string', value: 'projectType', text: '项目类型（1材料设备）' })
      fieldList.push({ type: 'string', value: 'tenderProjectCode', text: '招标项目编号' })
      fieldList.push({ type: 'string', value: 'tenderProjectName', text: '招标项目名称' })
      fieldList.push({ type: 'string', value: 'povertyReliefProject', text: '是否扶贫项目（1是0否）' })
      fieldList.push({ type: 'string', value: 'publicResourceType', text: '公共资源交易类型' })
      fieldList.push({ type: 'string', value: 'engineeringMajorType', text: '工程专业类型' })
      fieldList.push({ type: 'string', value: 'admissionDepartment', text: '入场登记部门' })
      fieldList.push({ type: 'string', value: 'projectAdministrationArea', text: '项目行政主管地区' })
      fieldList.push({ type: 'string', value: 'industryAuthorities', text: '行业主管部门' })
      fieldList.push({ type: 'string', value: 'managementDeptno', text: '行管部门审批备案编号' })
      fieldList.push({ type: 'string', value: 'biddingMethod', text: '招标方式' })
      fieldList.push({ type: 'string', value: 'prequalificationMethod', text: '资审方式' })
      fieldList.push({ type: 'string', value: 'tenderDocumentsMethod', text: '递交投标文件方式' })
      fieldList.push({ type: 'string', value: 'tenderOrganizeForm', text: '招标组织形式' })
      fieldList.push({ type: 'string', value: 'mainConstructionUnit', text: '主体建设单位' })
      fieldList.push({ type: 'string', value: 'organNo', text: '组织机构代码/统一社会信用代码' })
      fieldList.push({ type: 'string', value: 'unitResponsiblePerson', text: '单位负责人' })
      fieldList.push({ type: 'string', value: 'phone', text: '办公电话' })
      fieldList.push({ type: 'string', value: 'mobile', text: '移动电话' })
      fieldList.push({ type: 'string', value: 'tenderAgencyName', text: '招标代理机构名称' })
      fieldList.push({ type: 'string', value: 'tenderAgencyCode', text: '招标代理组织机构代码/统一社会信用代码' })
      fieldList.push({ type: 'string', value: 'tendererName', text: '招标负责人' })
      fieldList.push({ type: 'string', value: 'tendererPhone', text: '招标负责人办公电话' })
      fieldList.push({ type: 'string', value: 'tendererMobile', text: '移动电话' })
      fieldList.push({ type: 'string', value: 'projectSource', text: '项目来源' })
      fieldList.push({ type: 'int', value: 'version', text: '入库时间（时间戳）' })
      fieldList.push({ type: 'string', value: 'jyptBh', text: '交易平台编号' })
      fieldList.push({ type: 'string', value: 'areaCode', text: '行政区划代码' })
      this.superFieldList = fieldList
    },
  },
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>